<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
 <base href="<%=basePath%>">   
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 <title>标题</title>  
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link rel="stylesheet" href="<%=basePath%>css/bootstrap.min.css">  
	<!--[if lt IE 9]>
	<script src="<%=basePath%>js/jquery-1.11.3.js"></script>    
	<![endif]-->
	<!--[if gte IE 9]><!-->
	<script src="<%=basePath%>js/jquery-3.1.1.js"></script>
	<!--<![endif]-->
	<script src="<%=basePath%>js/bootstrap.min.js"></script>
	
	</head>
<body>

<div class="container" id="app">
	<div class="row clearfix">
		<div class="col-md-12 column">
			<ul class="breadcrumb">
				<li>
					 <a href="#">Home</a>
				</li>
				<li>
					 <a href="#">Library</a>
				</li>
				<li class="active">
					Data
				</li>
			</ul>
			<table class="table table-striped" id="table1">
			<caption>table:goods</caption>
				<thead>
					<tr>
						<th>
							编号
						</th>
						<th>
							产品
						</th>
						<th>
							价格
						</th>
						<th>
							说明
						</th>
					</tr>
				</thead>
				<tbody>
				</tbody>
			</table>
		</div>
	</div>
</div>
</body>
</html>
<script>
vurl="s/good?method=all";
$.get(vurl, function(data, status) {	
	var rows=JSON.parse(data);
	for(var i =0;i<rows.length;i++){
		var row=rows[i];
	  
		var s=("<tr >"
				+"<td>"+row.id+"</td>"
				+"<td>"+row.title+"</td>"
				+"<td>"+row.price+"</td>"
				+"<td>"+row.categorytitle+"</td>"
				+"</tr>");
		$("#table1 tbody").append(s);
   }
});
</script>


